<?php
class specialApi extends baseApi{

	//构成菜单
	public function hook_menu_category(){
        return array(
            0 => array('name'=>'专题分类','url'=>url('admin_category/index'),'sequence'=>2),
            );
    }

    public function hook_menu_content(){
        return array(
            0 => array('name'=>'专题管理','url'=>url('admin_list/index'),'sequence'=>1),
            );
    }

    //列表标签
    public function hook_label_list(){
        return array(
            'special_category'=>array(
                'app'=>'special',
                'action'=>'label_special_category',
            ),
            'special_list'=>array(
                'app'=>'special',
                'action'=>'label_special_list',
            ),
        );
    }

    public function hook_purview_admin()
    {
        return array(
            'admin_category'=>array(
                'name'=>'专题分类',
                'auth'=>array(
                    'index'=>'列表',
                    'add'=>'添加',
                    'edit'=>'编辑',
                    'del'=>'删除',
                ),
            ),
            'admin_list'=>array(
                'name'=>'专题列表',
                'auth'=>array(
                    'index'=>'列表',
                    'add'=>'添加',
                    'edit'=>'编辑',
                    'del'=>'删除',
                ),
            ),
        );
    }

    public function label_special_category($data){
        return model('label_special')->class_list($data['data']);
    }

    public function label_special_list($data){
        return model('label_special')->special_list($data['data']);
    }

	//删除关联专题内容
	public function hook_admin_content_del_data($aid)
    {
    	return model('special_list')->del($aid);
    }

    //删除关联推荐位
    public function hook_admin_recommend_relation_del_data($id)
    {
        return model('special_recommend')->relation_del($id);
    }

	
}